home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / v cisle / ozo / zotero-1.0.3.xpi / chrome / zotero.jar / content / zotero / timelineInterface.js < prev    next >
Encoding:
JavaScript  |  2007-08-02  |  1.3 KB  |  48 lines

  1. /*
  2.     ***** BEGIN LICENSE BLOCK *****
  3.     
  4.     Copyright (c) 2006  Center for History and New Media
  5.                         George Mason University, Fairfax, Virginia, USA
  6.                         http://chnm.gmu.edu
  7.     
  8.     Licensed under the Educational Community License, Version 1.0 (the "License");
  9.     you may not use this file except in compliance with the License.
  10.     You may obtain a copy of the License at
  11.     
  12.     http://www.opensource.org/licenses/ecl1.php
  13.     
  14.     Unless required by applicable law or agreed to in writing, software
  15.     distributed under the License is distributed on an "AS IS" BASIS,
  16.     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17.     See the License for the specific language governing permissions and
  18.     limitations under the License.
  19.     
  20.     ***** END LICENSE BLOCK *****
  21. */
  22.  
  23.  
  24. var Zotero_Timeline_Interface = new function() {
  25.     this.loadTimeline = loadTimeline;
  26.     
  27.     /*
  28.      * Load a timeline for the currently selected collection
  29.      */
  30.     function loadTimeline() {
  31.         var uri = 'zotero://timeline/';
  32.         var id = ZoteroPane.getSelectedCollection(true);
  33.         
  34.         if (id) {
  35.             window.loadURI(uri + 'collection/' + id);
  36.             return;
  37.         }
  38.         
  39.         var id = ZoteroPane.getSelectedSavedSearch(true);
  40.         if (id) {
  41.             window.loadURI(uri + 'search/' + id);
  42.             return;
  43.         }
  44.         
  45.         window.loadURI(uri);        
  46.     }
  47. }
  48.